#ifndef PPL_HTTP
#define PPL_HTTP

#include <stdint.h>
#include <stdio.h>
#include <arpa/inet.h>
#include <ctype.h>
#include <algorithm>
#include <string>
#include "Packet.h"
#include "GlobalCounter.h"

using namespace std;

#define HEADER_BUFFER_LENGTH 2048

class HTTP
{
	public:
		HTTP();
		int parse(Packet* pkt);
	private:
		int getStrLenBy0X0D0A(const uint8_t* src, int maxlen);

		int inCheck(uint8_t* data, int* fieldLength);
		int strCmp(char* src, char* dst);

		uint8_t headerBuffer[HEADER_BUFFER_LENGTH];
};

#endif
